package com.dao;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.po.Well_StudentPO;
@Repository
public class WellStudentDao {
	@Autowired
	private SqlSessionTemplate sqlTemplate;
	
	/**
	 * 查找所有优秀学员的信息
	 * @return
	 */
	public List<Well_StudentPO> findWellStudentInfo() {
		return sqlTemplate.selectList("wellStudent.findWellStudentInfo");
	}
	/**
	 * 保存新的学员信息
	 * @param ws
	 */
	public void saveInfo(Well_StudentPO ws) {
		sqlTemplate.insert("wellStudent.saveInfo",ws);
	}
	
	/**
	 * 删除学员信息
	 * @param id
	 */
	public void deleteInfo(String id) {
		sqlTemplate.delete("wellStudent.deleteInfo",id);
	}
	/**
	 * 修改学员信息
	 * @param ws
	 */
	public void updateInfo(Well_StudentPO ws) {
		sqlTemplate.update("wellStudent.updateInfo",ws);
	}

	
}
